package com.itheima.mapper;

import com.itheima.pojo.User;
import com.itheima.pojo.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 王同学
 */
@Mapper
@Repository
public interface UserMapper {

    User seleteByPhone(@Param("phone") String phone);

    boolean add(User user);


    User seleteById(String userid);

    boolean updateById(@Param("user") User user);

    List<User> seleteByIds(@Param("list") List<String> idList,@Param("page") Integer page,@Param("pageSize") Integer pageSize);

    Long selectCountById(List<String> idList);

    boolean updateByPhone(@Param("id") String userId,@Param("phone") String phone);

    boolean updateUserById(@Param("id") String id,@Param("user") User user);
}
